

export default class Constant {
    reqData = [{
        rqUrl: '/platform/templet/querypage.do',
        rqJson: `{\n  \"pagecode\": \"60092060nccloud\",\n  \"appcode\": \"60092060\"\n}`,
        rqCode: 'template'
    }, {
        rqUrl: '/platform/templet/querypage.do',
        rqJson: `{\n  \"pagecode\": \"60092060batch\",\n  \"appcode\": \"60092060\"\n}`,
        rqCode: 'batch_add'
    }, {
        rqUrl: '/platform/appregister/queryallbtns.do',
        rqJson: `{\n  \"pagecode\": \"60092060nccloud\",\n  \"appcode\": \"60092060\"\n}`,
        rqCode: 'button'
    }, {
        rqUrl: '/platform/appregister/queryappcontext.do',
        rqJson: `{\n  \"appcode\": \"60092060\"}`,
        rqCode: 'context'
    }];

    getRequest = (app) => {
        // 解决审批中心  以及复制节点的问题
        let code = app.appcode
        if (code.length > 8) {
            code = code.slice(0,8)
        }
        return [{
            rqUrl: '/platform/templet/querypage.do',
            rqJson: `{\n  \"pagecode\": \"${code}nccloud\",\n  \"appcode\": \"${app.appcode}\"\n}`,
            rqCode: 'template'
        }, {
            rqUrl: '/platform/templet/querypage.do',
            rqJson: `{\n  \"pagecode\": \"${code}batch\",\n  \"appcode\": \"${app.appcode}\"\n}`,
            rqCode: 'batch_add'
        }, {
            rqUrl: '/platform/appregister/queryallbtns.do',
            rqJson: `{\n  \"pagecode\": \"${code}nccloud\",\n  \"appcode\": \"${app.appcode}\"\n}`,
            rqCode: 'button'
        }, {
            rqUrl: '/platform/appregister/queryappcontext.do',
            rqJson: `{\n  \"appcode\": \"${app.appcode}\"}`,
            rqCode: 'context'
        }];
    }
}